import request from "@/utils/request";

// 查询员工满意度主题列表
export function listDegreetitle(query) {
  return request({
    url: "/cld/degreetitle/list",
    method: "get",
    params: query,
  });
}

// 查询员工满意度主题列表 - 不分页
export function getDegreeTitleList(query) {
  return request({
    url: "/cld/degreetitle/getDegreeTitleList",
    method: "get",
    params: query,
  });
}

// 查询员工满意度主题详细
export function getDegreetitle(degreetitleId) {
  return request({
    url: "/cld/degreetitle/" + degreetitleId,
    method: "get",
  });
}

// 新增员工满意度主题
export function addDegreetitle(data) {
  return request({
    url: "/cld/degreetitle",
    method: "post",
    data: data,
  });
}

// 修改员工满意度主题
export function updateDegreetitle(data) {
  return request({
    url: "/cld/degreetitle",
    method: "put",
    data: data,
  });
}

// 删除员工满意度主题
export function delDegreetitle(degreetitleId) {
  return request({
    url: "/cld/degreetitle/" + degreetitleId,
    method: "delete",
  });
}

// 发起调查
export function startSurvey(data) {
  return request({
    url: "/cld/degreetitle/startSurvey",
    method: "put",
    data: data,
  });
}

// 查询满意度结果列表
export function listResult(query) {
  return request({
    url: "/cld/result/list",
    method: "get",
    params: query,
  });
}

// 查询满意度结果详细
export function getResult(degreetitleResultId) {
  return request({
    url: "/cld/result/" + degreetitleResultId,
    method: "get",
  });
}

// 新增满意度结果
export function addResult(data) {
  return request({
    url: "/cld/result",
    method: "post",
    data: data,
  });
}

// 修改满意度结果
export function updateResult(data) {
  return request({
    url: "/cld/result",
    method: "put",
    data: data,
  });
}

// 删除满意度结果
export function delResult(degreetitleResultId) {
  return request({
    url: "/cld/result/" + degreetitleResultId,
    method: "delete",
  });
}

// 查询满意度问题列表
export function listProblem(query) {
  return request({
    url: "/cld/problem/list",
    method: "get",
    params: query,
  });
}

// 查询满意度问题详细
export function getProblem(degreetitleProblemId) {
  return request({
    url: "/cld/problem/" + degreetitleProblemId,
    method: "get",
  });
}

// 新增满意度问题
export function addProblem(data) {
  return request({
    url: "/cld/problem",
    method: "post",
    data: data,
  });
}

// 修改满意度问题
export function updateProblem(data) {
  return request({
    url: "/cld/problem",
    method: "put",
    data: data,
  });
}

// 删除满意度问题
export function delProblem(degreetitleProblemId) {
  return request({
    url: "/cld/problem/" + degreetitleProblemId,
    method: "delete",
  });
}

// 查询员工投诉列表
export function listComplaint(query) {
  return request({
    url: "/cld/complaint/list",
    method: "get",
    params: query,
  });
}

// 查询员工投诉详细
export function getComplaint(staffComplaintId) {
  return request({
    url: "/cld/complaint/" + staffComplaintId,
    method: "get",
  });
}

// 新增员工投诉
export function addComplaint(data) {
  return request({
    url: "/cld/complaint",
    method: "post",
    data: data,
  });
}

// 修改员工投诉
export function updateComplaint(data) {
  return request({
    url: "/cld/complaint",
    method: "put",
    data: data,
  });
}

// 删除员工投诉
export function delComplaint(staffComplaintId) {
  return request({
    url: "/cld/complaint/" + staffComplaintId,
    method: "delete",
  });
}

// 满意度详情查看
export function selectSurveryDetails(query) {
  return request({
    url: "/cld/result/selectSurveryDetails",
    method: "get",
    params: query,
  });
}

// 投诉回复
export function addReply(data) {
  return request({
    url: "/cld/complaint/addReply",
    method: "post",
    data: data,
  });
}
